Feature Group
bash internal / data manipulations / positional arguments (12)
4
bash
This demonstrates the use of built-in Bash variables to access script information like return values, process ID, and arguments.
echo "Last program's return value: $?" echo "Script's PID: $$" echo "Number of arguments passed to script: $#" echo "All arguments passed to script: $@" echo "Script's arguments separated into different variables: $1 $2..."
bash internaldata manipulationspositional argumentsbuilt-in variables
8
bash
This demonstrates the usage of positional arguments in Bash scripts and functions.
$1 # first argument passed to a script or function $# # the number of arguments passed to a script or functio $* # all the arguments passed to a script or function, treating them as a single string $@ # all the arguments passed to a script or function, treating them as an array
bash internaldata manipulationspositional argumentspositional argument